<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>产品详情</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-win.css" />
<style type="text/css">
*{
	margin: 0;
	padding:0;
}
	img{
		width: 100%;
		
	}
	.goumai{
		width: 100%;
		height: 69px;
		background:#f5f5f5;
		position:fixed;
		top:45px;
		border-bottom:1px solid #ccc;
	}
	li p{
		float: left;
		width: 35%;
		height: 30px;
		line-height: 40px;
	}
	li input{
		float: left;
		width: 65%;
		border:none;
		border-bottom: 1px solid black;
		background: #f3f3f3;
		color:#666;
		height:27px;
	}
	#bttn{
		width: 80px;
		float: right;
		height: 30px;
		margin-right: 20px;
		margin-top: 20px;
		background: #fc8800;
		color: white;
		font-size: 16px;
		border-radius: 4px;
		text-align: center;
		line-height: 30px;

	}
	ul{
		width: 60%;
		height: 60px;
		float: left;
		margin-left: 20px;
	}
	span{
		color: #f3f3f3;
	}
	.tanchu1,.tanchu{
		width:80%;
		position: fixed;
		top: 60%;
		left: 50%;
		margin:-200px 0 0 -40%;
		background:white;
		border-radius:10px;
		z-index:1001;
		display:none;
	}
	.tanchu_main{
		width:100%;
		height:100%;
		position:fixed;
		top:0;
		background:black;
		z-index:1000;
		opacity: 0.7;
		display:none;
	}
	.tanchu_cttn1,.tanchu_cttn{
		width:80%;
		height:66%;
		margin-left:10%;
		border-bottom:1px solid #d3d3d3;
	}
	.bttn1,.bttn{
		width:80%;
		height:33%;
		margin-left:10%;
	}
	.tanchu_cttn p{
		width:100%;
		height:28%;
		line-height:30px;
		color:#333;
		font-size:15px;
	}
	.tanchu_cttn1 p{
		width:100%;
		height:30%;
		line-height:30px;
		color:#333;
		font-size:15px;
	}
	.bttn input{
		width:40%;
		height:50%;
		float:left;
		margin-top:4%;
		border:none;
		border-radius:5px;
		background:#d5d5d5;
		color:#333;
	}
	.bttn .queding{
		margin-left:20%;
		background:#fe8100;
		color:white;
	}
	.bttn1 input{
		width:60%;
		height:50%;
		margin-top:4%;
		border:none;
		border-radius:5px;
		background:#00abfd;
		color:white;
		margin-left:20%;
	}
	p span{
		color:#333;
	}
	.main{
		position:fixed;
		top:115px;
		width:100%;
		overflow:scroll;
		height:100%;
	}
	#img{
		margin-bottom:45px;
	}
	  *{
        padding:0;
        margin: 0;
    }
    iframe{
        border: none;
    }
</style>
</head>
<body>
<div class="div_loding_img">
		数据加载中
</div>
<div class="tanchu_main">
	
</div>
<ul class="tanchu">
	<li class="tanchu_cttn">
		<p style="color:#666;font-size:14px;margin-top:3%;">请核对您的信息:</p>
		<p class="lxr_name"></p>
		<p class="lxr_tel"></p>
	</li>
	<li class="bttn">
		<input type="button" value="取消" class="quxiao" onclick="quxiao()">
		<input type="button" value="确定" class="queding" onclick="queding()">
	</li>
</ul> 
<ul class="tanchu1">
	<li class="tanchu_cttn1">
		<p class="dingdanhao" style="margin-top:10%;"></p>
		<p class="rexian"><span>热线电话：</span><a></a></p>
	</li>
	<li class="bttn1">
		<input type="button" value="确定" onclick="guanbi()">
	</li>
</ul>
	<header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
		<a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" onclick="back_go()"> <span class="aui-iconfont aui-icon-left"></span></a>
		<div class="aui-title" id="title">
			
		</div>
	</header>
	<div class="margin_div" style="height:115px;"></div>
	<div class="goumai">
		<ul>
			<li>
				<p>联系人：</p>
				<input type="text" id="in_name">
			</li>
			<li>
				<p>手机号：</p>
				<input type="text" id="in_iphone">
			</li>
		</ul>
		<div onclick="xdfBttn()" id="bttn">预约/购买</div>
	</div>
	<article class="main"  id="wrapper">  
		<div id="img"></div>
		<div class="margin_div" style="height:100px;"></div>
	</article>
	
	<script type="text/javascript">
	    (function(m, ei, q, i, a, j, s) {
        m[a] = m[a] || function() {
            (m[a].a = m[a].a || []).push(arguments)
        };
        j = ei.createElement(q),
            s = ei.getElementsByTagName(q)[0];
        j.async = true;
        j.charset = 'UTF-8';
        j.src = i;
        s.parentNode.insertBefore(j, s)
    })(window, document, 'script', '//eco-api.meiqia.com/dist/meiqia.js', '_MEIQIA');
    _MEIQIA('entId', 4501);
</script>
	<script src="../../script/jquery-1.10.2.min.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript">
	$(".tanchu").height($(".tanchu").width()/2)
	$(".tanchu1").height($(".tanchu1").width()/2)
	sTart_Stop();
	var a =getUrlParam("infoid");
	var b =getUrlParam("name");
	var pirce_1;
	var conmpny;
	var num=1;
	$("#title").html(b);
	var post;
	var baseDatas;
	var name;
	baseDatas=basedata('ecinfo');
	post=baseDatas+"&ecpid="+a;
	ajaxcocRequest('../../../api/group/getgroupecprodinfoObject', 'post', post, function(msg){
        if(msg.code==100){
        	if(msg.datum.n1==1)
        	{
        		
        		//window.location ="loadthreepage.html?neturl="+msg.datum.n2;
        		$("#img").append("<object type='text/html' data='"+msg.datum.n2+"' style='width:"+$(window).width()+"px;height:"+$(window).height()+"px'  id='weburl'></object>");
        	}else
        	{
        		$("#img").html(msg.datum.n2);
        	}
        	conmpny=msg.datum.n3;//单位
        	pirce_1=msg.datum.n4;//单价
        }
        else{
        	$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
        }
    });
	
		var iphone;

		function xdfBttn(){
			var re=/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
			if($('#in_iphone').val()==" "){
				
			}
			else{
				if(re.test($('#in_iphone').val())==false){
					alert("号码错误再来一次，请输入正确的手机号！")
				}
				else{
					iphone=$("#in_iphone").val();
					name =$("#in_name").val();
					$(".tanchu_main").css("display","block");
					$(".tanchu").css("display","block");
					$(".lxr_name").html("联系人："+name)
					$(".lxr_tel").html("电话："+iphone)
				}
				
				
				
			}
		}
		function queding(){
			var Post={
            		mid:$mid,
            		groupid:$groupid,
            		did:initdata.get('ecinfo'),
            		ecid:a,
            		ecprice:100,
            		ecnum:1,
            		ecunit:"10",
            		mcaid:name,
            		eccomment:iphone
            	}
			ajaxCoCRequest('../../../api/group/savegroupecorder','post',Post,function(msg){
				if(msg.code==100){
					var dingdan =JSON.stringify(msg).substr(12,14)
					var rexian =4008010090;
					$(".tanchu").css("display","none");
					$(".tanchu1").css("display","block");
					$(".dingdanhao").html("您的订单号："+dingdan);
					$(".rexian a").html(rexian);
					$(".rexian a").attr("href","tel:"+rexian)
				}
				else{
					$("body").append('<div class="wuwang"><img src="../../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
					console.log(JSON.stringify(msg))
				}
			})
		}
		function quxiao(){
			$(".tanchu_main").css("display","none");
			$(".tanchu").css("display","none");
		}
		function guanbi(){
			$(".tanchu1").css("display","none");
			$(".tanchu_main").css("display","none");
		}
	</script>
</body>
</html>